@import '../../../../variables';
@import '../../tasks/task/task.component.mixins';

:host {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  width: 260px;
  // there needs to be enough space for the fab buttons

  padding-bottom: 96px;
  margin-bottom: 32px;
}

:host header {
  margin-top: 16px;
  margin-right: -4px;
  margin-left: -4px;
  border-radius: 8px;
  //position: sticky;
  //top: -2px;
  //&.is-stuck {
  //  background: white;
  //  box-shadow: $whiteframe-shadow-2dp;
  //  z-index: 10;
  //}
}

.day-title {
  font-size: 22px;
  text-align: center;
  font-weight: bold;
  vertical-align: middle;
  padding-top: 8px;

  .date {
    font-size: 12px;
  }
}

.day-counts {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  border-radius: 4px;
  font-size: 18px;

  mat-icon:last-of-type {
    margin-left: 8px;
    font-size: 16px;
  }
}

.day-estimate {
  margin-top: 8px;
  font-size: 16px;
  text-align: center;
}

.section-title {
  display: flex;
  justify-content: center;
  margin: 12px 0 8px;
}

.normal-tasks,
.scheduled {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}

.scheduled {
  flex-grow: 1;
}

.normal-tasks-items,
.scheduled-items {
  min-height: $planner-item-height;
  flex-grow: 1;
}

.normal-tasks-items > * {
  margin-bottom: 8px;
}

.scheduled {
  /* Additional styles if needed */
  margin-top: 16px;
}

.scheduled-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;

  &.Task .time {
    cursor: pointer;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-radius: 50%;
    background: #fff;

    @include darkTheme() {
      background: $task-c-bg-dark;
    }
  }

  .time {
    text-align: center;
    border-radius: 50%;
    width: 40px;
    line-height: 40px;
    height: 40px;
    min-width: 40px;
    margin-right: 4px;
    flex-grow: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: $planner-font-size-smaller-mobile;

    @include mq(xs) {
      font-size: $planner-font-size-smaller;
    }

    mat-icon {
      display: none;
    }

    &:hover {
      mat-icon {
        display: block;
      }

      span {
        display: none;
      }
    }
  }

  > :nth-child(2) {
    flex-grow: 1;
  }
}

.empty {
  text-align: center;
  font-style: italic;
  line-height: $planner-item-height;
  height: 0;
}
